package com.neu.credit.creditscore.service.hospital;

import com.neu.credit.creditscore.common.utils.Result;
import com.neu.credit.creditscore.dto.req.AddDepartmentReq;
import com.neu.credit.creditscore.dto.req.DrugSaveReq;
import com.neu.credit.creditscore.dto.req.ExamSaveReq;
import com.neu.credit.creditscore.dto.req.HospitalPreOrderReq;
import com.neu.credit.creditscore.dto.res.book.BooksPageListRes;
import com.neu.credit.creditscore.dto.res.hospital.*;
import com.neu.credit.creditscore.entity.books.Books;
import com.neu.credit.creditscore.entity.hospital.Departments;
import com.neu.credit.creditscore.entity.hospital.Doctors;
import com.baomidou.mybatisplus.extension.service.IService;
import com.neu.credit.creditscore.entity.hospital.ExaminationItems;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 * 医生信息表 服务类
 * </p>
 *
 * @author baomidou
 * @since 2025-06-17
 */
public interface DoctorsService extends IService<Doctors> {

    Result<List<RecommendDoctorsRes>> getRecommendDoctor();

    Result<List<Departments>> getDepartments(int departmentType);

    Result<DoctorListInfoRes> getDoctors(int departmentId);

    Result<Doctors> getDoctorsDetail(int doctorId);

    Result<HospitalPreOrderInfoRes> getPreOrderInfo(HospitalPreOrderReq hospitalPreOrderReq,Integer userId);

    Result<String> order(int appointmentId);

    Result<List<MyAppointmentRes>> orderMyList(Integer userId);

    Result<String> cancelAppoint(int appointmentId);

    Result<List<PatientInfoRes>> getPatientsList(Integer doctorId);

    Result<String> startCheck(int patientId, int doctorId);

    Result<PatientInfoRes> getCheckNow();

    Result<String> finishCheck(int patientId, int doctorId);

    Result<ExaminationInfoRes> getExamList(int departmentId, String itemName, int patientId);

    Result<String> saveExamList(ExamSaveReq examSaveReq,Integer doctorId);

    Result<DrugInfoRes> getDrug(String drugName, int patientId);

    Result<String> saveDrug(DrugSaveReq drugSaveReq,Integer doctorId);

    Result<String> saveDiagnosis(int appointmentId, String diagnosisResult) ;

    Result<ResultDetailRes> getResultDetail(int appointmentId, Integer userId);

    Result<PreFeeRes> prePayFee(int appointmentId);

    Result<String> payFee(int feeId );

    Result<DepartmentPageRes> getDepartmentList(int pageNum, int pageSize, int departmentId, String departmentName);

    Result<String> addDepartment(AddDepartmentReq addDepartmentReq);

    Result<Departments> getDepartmentDetail(int departmentId);

    Result<String> updateDepartment(Departments departments);

    Result<String> deletedDepartment(int departmentId);

    Result<DoctorListRes> getDoctorList(int pageNum, int pageSize, int doctorId, String doctorName);

    Result<String> addDoctor(Doctors doctors );

    Result<String> deletedDoctor(int doctorId);

    Result<Doctors> getDoctorDetail(int doctorId);

    Result<String> updateDoctor(Doctors doctors );
    Doctors validateLogin(String phone, String password);
    Result<List<PatientInfoRes>> searchPatientsByName(Integer doctorId, String patientName);
}
